<?php /* @var $this SupplierController */ ?>
<?php if (Yii::app()->user->hasFlash('success')): ?>
    <div class="alert alert-success">  
        <a class="close" data-dismiss="alert">×</a>  
        <?php echo Yii::app()->user->getFlash('success') ?>
    </div>  
<?php endif ?>
<?php if (Yii::app()->user->hasFlash('error')): ?>
    <div class="alert alert-error">  
        <a class="close" data-dismiss="alert">×</a>  
        <?php echo Yii::app()->user->getFlash('error') ?>
    </div>  
<?php endif ?>
<?php $form = $this->beginWidget('CActiveForm'); ?>
<?php /* @var $form CActiveForm */ ?>
<div class="row">
    <div class="span12">
        <fieldset>  
            <legend>Mặt hàng</legend>  
            <div class='clearfix'>
                <label for="address">Tên nhà cung cấp</label>
                <div class='input'>
                    <?php echo $form->textField($model, 'name', array('size' => 80, 'maxlength' => 45)); ?>
                    <?php echo $form->error($model, 'name'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <label for="address">Điện thoại</label>
                <div class='input'>
                    <?php echo $form->textField($model, 'phone', array('size' => 100, 'maxlength' => 100)); ?>
                    <?php echo $form->error($model, 'phone'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <label for="address">Địa chỉ</label>
                <div class='input'>
                    <?php echo CHtml::activeTextArea($model, 'address', array('rows' => 5, 'cols' => 100, 'class' => 'span5')); ?>
                    <?php echo $form->error($model, 'address'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <div class='input'>
                    <?php echo CHtml::submitButton($model->isNewRecord ? 'Nhập nhà cung cấp mới' : 'Lưu lại thay đổi', array('class' => 'btn btn-primary')); ?>
                    <?php echo CHtml::button('Quay về trang nhà cung cấp', array('class' => 'btn', 'onclick' => 'javascript:location.href = \'' . $this->createUrl('list') . '\'')) ?>
                </div>
            </div>
        </fieldset> 
    </div>
</div>
<?php $this->endWidget(); ?>